//
//  Work_remindTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 16/9/14.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Work_remindTableViewCell.h"

@implementation Work_remindTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.image_Select = [[UIImageView alloc] init];
    self.image_Select.image = [UIImage imageNamed:@"checknumber.png"];
    [self.contentView addSubview:self.image_Select];
    self.image_Select.hidden = YES;
    
    self.name = [[UILabel alloc] init];
    self.name.textColor = [UIColor blackColor];
    self.name.font = [UIFont systemFontOfSize:17.0f];
    [self.contentView addSubview:self.name];
    
    self.permission = [[UILabel alloc] init];
    self.permission.textColor = [UIColor grayColor];
    self.permission.font = [UIFont systemFontOfSize:14.0f];
    [self.contentView addSubview:self.permission];
    
    //
    self.icon_return = [[UIImageView alloc] init];
    self.icon_return.image = [UIImage imageNamed:@"rigth-return.png"];
    [self.contentView addSubview:self.icon_return];
    
    //
    self.view_Line = [[UIView alloc] init];
    self.view_Line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_Line];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.image_Select.frame = CGRectMake(15, 17.5, 15, 15);
    
    self.name.frame = CGRectMake(CGRectGetMaxX(self.image_Select.frame) + 15, 6, SCREEN_WIDTH - CGRectGetMaxX(self.image_Select.frame) - 55, 20);
    
    self.permission.frame = CGRectMake(CGRectGetMinX(self.name.frame), CGRectGetMaxY(self.name.frame) + 3, SCREEN_WIDTH - CGRectGetMinX(self.name.frame) - 40, 15);
    
    self.icon_return.frame = CGRectMake(SCREEN_WIDTH - 30, 15, 20, 20);
    
    self.view_Line.frame = CGRectMake(CGRectGetMinX(self.name.frame), 49, SCREEN_WIDTH - CGRectGetMinX(self.name.frame), 1);
}


@end
